<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
if($_RQ['op']=='list'){
	$daytime = mktime(0,0,0,date('m'),date('d'),date('Y'));
	$store=pdo_get('jy_weishop_store',array('uniacid'=>$_SESSION['uniacid'],'id'=>$this->store_id));
	$store['desc'] = strip_tags(str_replace('&nbsp;','',$store['desc']));
	$store['desc'] = $store['desc'] ?cfc('tools')->substr($store['desc'],0,108):'';
	$return['isopenvoice']=$store['isopenvoice'];
	$return['store']=$store;
	$return['worker']=$worker;
	$avatar=pdo_getcolumn('core_members',array('id'=>$return['item']['mid']),'avatar');
	$return['store']['logo']=$return['store']['logo']?$return['store']['logo']:$avatar;
	$return['lunum']=pdo_count('jy_yxgoodserpfw_kulog',array('uniacid'=>$_SESSION['uniacid'],'type'=>0,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['chunum']=pdo_count('jy_yxgoodserpfw_kulog',array('uniacid'=>$_SESSION['uniacid'],'type'=>1,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['tuium']=pdo_count('jy_yxgoodserpfw_kulog',array('uniacid'=>$_SESSION['uniacid'],'type'=>3,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['uphenumday']=pdo_count('jy_yxgoodserpfw_kulog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>4,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['lunumday']=pdo_count('jy_yxgoodserpfw_kulog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>0,'code_type'=>1,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['lunum2day']=pdo_count('jy_yxgoodserpfw_kulog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>0,'code_type'=>0,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['chunumallday']=pdo_count('jy_yxgoodserpfw_kulog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>1,'xiang_id'=>0,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['chunumday']=pdo_count('jy_yxgoodserpfw_kulog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>1,'xiang_id'=>0,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['chunum2day']=pdo_count('jy_yxgoodserpfw_kulog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>1,'xiang_id >'=>0,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['tuinumday']=pdo_count('jy_yxgoodserpfw_kulog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>3,'xiang_id'=>0,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['tuinum2day']=pdo_count('jy_yxgoodserpfw_kulog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>3,'xiang_id >'=>0,'workerid'=>$this->workerid,'storeid'=>$this->store_id));
	$return['footernav']=array(
		array('title'=>$this->juese==20?'入库员':'出库员','icon'=>'icon-shouye','action'=>'jy_yxgoodserpfw/store.index/'),
		array('title'=>'库记录','icon'=>'icon-yonghujieru','action'=>'jy_yxgoodserpfw/store.kulog/'),
	);
	set_html('title',$this->juese==20?'入库员':'出库员');
	exi($return);
}